package Stream流;

import java.util.*;
import java.util.stream.Stream;

public class get_Stream {
    public static void main(String[] args) {
        //1.Collection集合获取流
        Collection<String> a=new ArrayList<>();
        Stream<String> aStream=a.stream();
        //2.map集合获取流
        Map<String,Integer> b=new HashMap<>();
        //(1)键流
        Stream<String> b_nameStream=b.keySet().stream();
        //(2)值流
        Stream<Integer> b_ageStream=b.values().stream();
        //(3)键对值
        Stream<Map.Entry<String,Integer>> bStream=b.entrySet().stream();
        //3.数组获取流
        String[] c=new String[2];
        Stream<String> cStream= Arrays.stream(c);
        Stream<String> cStream2= Stream.of(c);
    }
}
